#ifndef _BUILT_IN_INTERPRETER_HPP_
#define _BUILT_IN_INTERPRETER_HPP_

#include "Interpreter.hpp"

using namespace boost;
using namespace std;

#define A(str) encode<EncodingT,ansi>(str)
#define C(str) encode<ansi,EncodingT>(str)

NAMESPACE_BEGIN(interp)

// IncludeInstruction term
template <class EncodingT>
class IncludeInstruction
: public Term<EncodingT>
{
private:
    shared_ptr< Term<EncodingT> > m_instruction;

public:
    IncludeInstruction(shared_ptr< Term<EncodingT> > const& instruction)
    : m_instruction(instruction)
    {}    
    shared_ptr< Base<EncodingT> > interpret(Context<EncodingT> & c);
    static bool parse(typename EncodingT::string_t const& buf, shared_ptr< Term<EncodingT> > & value);
};

// PrintInstruction term
template <class EncodingT>
class PrintInstruction
: public Term<EncodingT>
{
private:
    shared_ptr< Term<EncodingT> > m_instruction;

public:
    PrintInstruction(shared_ptr< Term<EncodingT> > const& instruction)
    : m_instruction(instruction)
    {}    
    shared_ptr< Base<EncodingT> > interpret(Context<EncodingT> & c);
    static bool parse(typename EncodingT::string_t const& buf, shared_ptr< Term<EncodingT> > & value);
};

NAMESPACE_END

#include "BuiltInInstructionInterpreter_impl.hpp"

#undef C
#undef A

#endif